-module(web_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/0,start_child/0]).
-define(SERVER,?MODULE).
start_link() ->
	supervisor:start_link({local,?SERVER},?MODULE,[]).
init([]) ->
	Children = [
		{web_session,{web_session,start_link,[]},temporary,brutal_kill,worker,[web_session]}
		],
	RestartStrategy = {simple_one_for_one,0,1},
	{ok,{RestartStrategy,Children}}.
start_child() ->
	io:format("create a web session ~n"),
	supervisor:start_child(?SERVER,[]).